package com.heima.job;

/**
 * @ClassName ComputeHotArticleJob
 * @Description TODO
 * @Author @O_o
 * @Date 2023/8/27 20:53
 * @Version 1.0
 */
import com.heima.service.HotArticleService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Log4j2
public class ComputeHotArticleJob {

    @Autowired
    private HotArticleService hotArticleService;
    @XxlJob("computeHotArticleJob")
    public ReturnT<String> handle(String param) throws Exception {
        hotArticleService.computeHotArticle();
        log.info("热文章分值计算调度任务开始执行....");
        // TODO 待实现热点文章分值计算任务
        log.info("热文章分值计算调度任务完成....");
        return ReturnT.SUCCESS;
    }
}
